<template>
    <div class="pageRight">
        <div class="pageRight-title">投票活动
            <router-link class="pull-right" to="/application/vote/add">
                <el-button type="primary" size="small">新建活动</el-button>
            </router-link>
        </div>
        <div class="pageRight-cont">
            <div class="page-screen">
                <router-link  to="">
                    <el-button type="text">全部</el-button>
                </router-link>
                <router-link  to="">
                    <el-button type="text">正在进行</el-button>
                </router-link>
                <router-link  to="">
                    <el-button type="text">已结束</el-button>
                </router-link>
            </div>
            <template>
                <el-table
                        :data="tableData"
                        stripe
                        style="width: 100%">
                    <el-table-column
                            prop="title"
                            label="活动名称"
                            >
                    </el-table-column>
                    <el-table-column
                            prop="num"
                            label="投票人数"
                            >
                    </el-table-column>
                    <el-table-column
                            prop="statu"
                            label="状态">
                    </el-table-column>
                    <el-table-column
                            :context="_self"
                            inline-template
                            label="操作">
                        <div>
                            <el-button
                                    size="small"
                                    @click="handleEdit($index, row)">
                                编辑
                            </el-button>
                            <el-button
                                    size="small"
                                    type="danger"
                                    @click="handleDelete($index, row)">
                                删除
                            </el-button>
                        </div>
                    </el-table-column>

                </el-table>
            </template>
        </div>

    </div>
</template>
<style>

</style>
<script>
    export default {
    data() {
      return {
        tableData: [
        {
          title: '王小虎',
          num: 55,
          statu: '正在进行中'
        },
        {
          title: '王小虎',
          num: 55,
          statu: '正在进行中'
        },
        {
          title: '王小虎',
          num: 55,
          statu: '正在进行中'
        },
        {
          title: '王小虎',
          num: 55,
          statu: '正在进行中'
        },
        {
          title: '王小虎',
          num: 55,
          statu: '正在进行中'
        }]
      }
    },
    methods: {
      handleEdit(index, row) {
        console.log(index, row);
      },
      handleDelete(index, row) {
        console.log(index, row);
      }
    }
  }

</script>
